home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / LITTLE / P3SRC.ZIP / ATARI / WARPS.H < prev   
Encoding:
C/C++ Source or Header  |  1996-02-07  |  3.4 KB  |  133 lines

  1. /****************************************************************************
  2. *                   warps.h
  3. *
  4. *  This module contains all defines, typedefs, and prototypes for WARPS.C.
  5. *
  6. *  from Persistence of Vision(tm) Ray Tracer
  7. *  Copyright 1996 Persistence of Vision Team
  8. *---------------------------------------------------------------------------
  9. *  NOTICE: This source code file is provided so that users may experiment
  10. *  with enhancements to POV-Ray and to port the software to platforms other
  11. *  than those supported by the POV-Ray Team.  There are strict rules under
  12. *  which you are permitted to use this file.  The rules are in the file
  13. *  named POVLEGAL.DOC which should be distributed with this file. If
  14. *  POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  15. *  Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  16. *  Forum.  The latest version of POV-Ray may be found there as well.
  17. *
  18. * This program is based on the popular DKB raytracer version 2.12.
  19. * DKBTrace was originally written by David K. Buck.
  20. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  21. *
  22. *****************************************************************************/
  23.  
  24. /* NOTE: FRAME.H contains other warp stuff. */
  25.  
  26. #ifndef WARP_H
  27. #define WARP_H
  28.  
  29.  
  30.  
  31. /*****************************************************************************
  32. * Global preprocessor defines
  33. ******************************************************************************/
  34.  
  35. /* Warp types */
  36. #define NO_WARP             0
  37. #define CLASSIC_TURB_WARP   1
  38. #define REPEAT_WARP         2
  39. #define SPIRAL_WARP         3
  40. #define BLACK_HOLE_WARP     4
  41. #define EXTRA_TURB_WARP     5
  42. #define TRANSFORM_WARP      6
  43.  
  44.  
  45.  
  46. /*****************************************************************************
  47. * Global typedefs
  48. ******************************************************************************/
  49.  
  50. typedef struct Repeat_Warp REPEAT;
  51. typedef struct Trans_Warp TRANS;
  52. typedef struct Spiral_Warp SPIRAL;
  53. typedef struct Black_Hole_Warp BLACK_HOLE;
  54.  
  55. struct Repeat_Warp
  56. {
  57.   WARP_FIELDS
  58.   int Axis;
  59.   SNGL Width;
  60.   VECTOR Flip, Offset;
  61. };
  62.  
  63. struct Trans_Warp
  64. {
  65.   WARP_FIELDS
  66.   TRANSFORM Trans;
  67. };
  68.  
  69. struct Spiral_Warp
  70. {
  71.   WARP_FIELDS
  72.   VECTOR Center;
  73.   SNGL Strength, Phase;
  74. };
  75.  
  76. struct Black_Hole_Warp
  77.  
  78. {
  79.  
  80.   WARP_FIELDS
  81.  
  82.   VECTOR      Center ;
  83.  
  84.   VECTOR      Repeat_Vector ;
  85.  
  86.   VECTOR      Uncertainty_Vector ;
  87.  
  88.   DBL         Strength ;
  89.  
  90.   DBL         Radius ;
  91.  
  92.   DBL         Radius_Squared ;
  93.  
  94.   DBL         Inverse_Radius ;
  95.  
  96.   DBL         Power ;
  97.  
  98.   short       Inverted ;
  99.  
  100.   short       Type ;
  101.  
  102.   short       Repeat ;
  103.  
  104.   short       Uncertain ;
  105.  
  106. } ;
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113. /*****************************************************************************
  114. * Global variables
  115. ******************************************************************************/
  116.  
  117.  
  118. /*****************************************************************************
  119. * Global constants
  120. ******************************************************************************/
  121.  
  122.  
  123. /*****************************************************************************
  124. * Global functions
  125. ******************************************************************************/
  126.  
  127. void Warp_EPoint PARAMS((VECTOR TPoint, VECTOR EPoint, TPATTERN *TPat));
  128. WARP *Create_Warp PARAMS((int Warp_Type));
  129. void Destroy_Warps PARAMS((WARP *Warps));
  130. WARP *Copy_Warps PARAMS((WARP *Old));
  131.  
  132. #endif
  133.